package db_main

import (
	"longmen/server/config/global"
	"longmen/server/pkg/db/mysql/models/models_main"
)

func GetAutoChatList(sportId int) ([]*models_main.AutoChat, error) {
	o := make([]*models_main.AutoChat, 0)
	if err := global.GetR().Select("id,keyword").Model(&models_main.AutoChat{}).Where("sport_id = ?", sportId).Find(&o).Error; err != nil {
		return nil, err
	} else {
		return o, err
	}
}
